package com.daotingli.backendprograms.Controller.Admin.Adminherd;

import com.daotingli.backendprograms.Service.Admin.Adminherd.AdminHerdService;
import com.daotingli.backendprograms.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class AdminHerdController {
    @Autowired
    private AdminHerdService adminHerdService;
    /**
     * 查询 所有用户 身份以及身份的个数
     * @return
     */
    @RequestMapping(path = "/admin/adminHerd/getAll",method = RequestMethod.POST)
    public Result getAllHerds(){
        return adminHerdService.getAllHerds();
    }
    /**
     * 查询 作者以及作者的书籍数量
     */
    @RequestMapping(path = "/admin/adminHerd/getBookAuthorSum",method = RequestMethod.POST)
    public Result getBookAuthorSum(){
        return adminHerdService.getBookAuthorSum();
    }
    /**
     *  查询 查每一个分类 的书籍数量
     */
    @RequestMapping(path = "/admin/adminHerd/getBookTypeSum",method = RequestMethod.POST)
    public Result getBookTypeSum(){
        return adminHerdService.getBookTypeSum();
    }
    /**
     * 查询 每一个书籍的标签数量
     */
    @RequestMapping(path = "/admin/adminHerd/getBookTagSum",method = RequestMethod.POST)
    public Result getBookTagSum(){
        return adminHerdService.getBookTagSum();
    }

}
